package com.bumptech.glide.load.engine;

import android.util.Log;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.ResourceDecoder;
import com.bumptech.glide.load.engine.cache.DiskCache;
import java.io.File;
import java.io.IOException;

class CacheLoader
{
  private static final String TAG = "CacheLoader";
  private final DiskCache diskCache;

  public CacheLoader(DiskCache paramDiskCache)
  {
    this.diskCache = paramDiskCache;
  }

  public <Z> Resource<Z> load(Key paramKey, ResourceDecoder<File, Z> paramResourceDecoder, int paramInt1, int paramInt2)
  {
    File localFile = this.diskCache.get(paramKey);
    Object localObject;
    if (localFile == null)
      localObject = null;
    while (true)
    {
      return localObject;
      try
      {
        Resource localResource = paramResourceDecoder.decode(localFile, paramInt1, paramInt2);
        localObject = localResource;
        if (localObject != null)
          continue;
        if (Log.isLoggable("CacheLoader", 3))
          Log.d("CacheLoader", "Failed to decode image from cache or not present in cache");
        this.diskCache.delete(paramKey);
        return localObject;
      }
      catch (IOException localIOException)
      {
        while (true)
        {
          boolean bool = Log.isLoggable("CacheLoader", 3);
          localObject = null;
          if (bool)
          {
            Log.d("CacheLoader", "Exception decoding image from cache", localIOException);
            localObject = null;
          }
        }
      }
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.bumptech.glide.load.engine.CacheLoader
 * JD-Core Version:    0.6.2
 */